package org.xiji.observer;

public class ObserverImpl implements Observer{
    private String name;

    public ObserverImpl() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ObserverImpl(String name) {
        this.name = name;
    }

    @Override
    public void update(SubjectImpl subject) {
        System.out.println(name + "收到通知，当前通知是：" + subject.getState());

    }
}
